package com.woniuxy.yoga.coach.model.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Pattern;

/**
 * 验证码登录的参数对象
 */
@ApiModel("验证码登录的参数对象")
@Data
public class CodeLoginForm {

    @Pattern(regexp = "1[3-9]\\d{9}",message = "联系方式格式错误")
    @ApiModelProperty("联系方式")
    private String coachPhone;

    @Length(min = 6,max = 6,message = "验证码长度有误")
    @ApiModelProperty("验证码")
    private String code;
}
